/**
 * Copyright (c) Css Team
 * All rights reserved.
 *
 * This file DictMan.java creation date: [Jan 13, 2014 15:21:03 PM] by liuzhb
 * http://www.css.com.cn
 */
package com.css.apps.base.dict.action;

import com.css.apps.base.dict.model.SDict;
import com.css.apps.base.dict.service.DictService;
import com.css.core.model.IServiceResult;
import com.css.util.Ajax;
import com.css.webbase.webwork.action.AdminAction;
import com.opensymphony.xwork.ModelDriven;

@SuppressWarnings("serial")
public class AddDict extends AdminAction implements ModelDriven {

	private SDict dict = null;

	public Object getModel() {
		return dict;
	}

	public AddDict() {
		dict = new SDict();
	}

	public String adminGo() {
		IServiceResult<String> res = DictService.addDict(dict);
		result = Ajax.JSONResult(res.getResultCode(), res.getResultDesc());
		return res.toActionResult();
	}

	public SDict getDict() {
		return dict;
	}

	public void setDict(SDict dict) {
		this.dict = dict;
	}
}
